/**
 * @author : liuxuzhao
 * @date : 2021-11-04
**/


import request from "../utils/request";


export default {
    doLogin(data){
        return request({
            url: '/users/login',
            method: 'POST',
            data
        })
    },
    getMenuList(){
        return request({
            url: '/users/getPermissionList',
            method: 'GET'
        })
    },
    getUserList(data){
        return request({
            url: '/users/list',
            method: 'GET',
            data
        })
    },
    removeUser(userIds){
        return request({
            url: '/users/delete',
            method: 'POST',
            data: {
                userIds
            }
        })
    },
    // 角色列表
    getRoleList(){
        return request({
            url: '/roles/allList',
            method: 'GET',
        })
    },
    // 部门列表
    getDeptList(){
        return request({
            url: '/dept/list',
            method: 'GET',
        })
    },
    // 创建和编辑用户
    createAndeditUser(data){
        return request({
            url: '/users/operate',
            method: 'POST',
            data
        })
    },
}